<template>
  <VDialog
    v-model="visible"
    width="500"
  >

    <!-- Dialog close btn -->
    <DialogCloseBtn @click="onConfirmation" />

    <!-- Dialog Content -->
    <VCard :title="props.title">
      <VCardText>
        {{props.content}}
      </VCardText>

      <VCardText class="d-flex justify-end">
        <VBtn @click="onConfirmation">
          {{$t('tableOperate.confirm')}}
        </VBtn>
      </VCardText>
    </VCard>
  </VDialog>
</template>

<script lang="ts" setup>
import { ref } from 'vue'

const props = defineProps({
  title:String,
  content:String
});

const emit = defineEmits([
  'confirm',
])

const onConfirmation = () => {
  emit('confirm')
  visible.value = false
}

const visible = ref(true)

</script>
